﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FisheryPlatform.Entity;

namespace FisheryPlatform.Bussiness.Menu
{
    public class MenuManager
    {
        static MenuManager()
        {
            #region
            //一级菜单
            List = new Dictionary<string, int>();
            List.Add("信息管理：", 1);
            List.Add("文章管理：", 2);
            List.Add("类别管理：", 3);
            List.Add("用户管理：", 4);
            List.Add("网站设置：", 5);
            List.Add("本站信息：", 6);

            //二级菜单
            SubList = new Dictionary<int, Dictionary<string, string>>();
            var subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("所有信息", "/Product/Index.aspx");
            subMenuItemList.Add("发布信息", "/Product/Publish.aspx");
            SubList.Add(1, subMenuItemList);

            subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("所有文章", "/Posts/Index.aspx");
            subMenuItemList.Add("发布文章", "/Posts/New.aspx");
            subMenuItemList.Add("文章类别", "/Posts/Category.aspx");
            subMenuItemList.Add("文章标签", "/Posts/Tag.aspx");
            SubList.Add(2, subMenuItemList);

            subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("所有类别", "/ShareCode/Index.aspx");
            subMenuItemList.Add("新增类别", "/ShareCode/ClassAdd.aspx");
            SubList.Add(3, subMenuItemList);

            subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("所有用户", "/Account/Index.aspx");
            subMenuItemList.Add("添加用户", "/Account/Edit.aspx");
            subMenuItemList.Add("我的个人资料", "/Account/Profile.aspx");
            SubList.Add(4, subMenuItemList);

            subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("基本设置", "/Settings/General.aspx");
            subMenuItemList.Add("缓存清除", "/Settings/Cache.aspx");
            SubList.Add(5, subMenuItemList);

            subMenuItemList = new Dictionary<string, string>();
            subMenuItemList.Add("关于我们", "/About/Index.aspx?t=" + OptionNameConstants.About_Us);
            subMenuItemList.Add("联系我们", "/About/Index.aspx?t=" + OptionNameConstants.About_Contact);
            SubList.Add(6, subMenuItemList);
            #endregion
        }

        public static Dictionary<string, int> List
        {
            get;
            private set;
        }

        public static Dictionary<int, Dictionary<string, string>> SubList
        {
            get;
            private set;
        }
    }
}
